<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        ul {
            display: flex;
            list-style: none;
        }
        
        li {
            margin-right: 10px;
        }
        
        .active {
            background-color: pink;
        }
    </style>
</head>

<div id="app">
    {{msg}}
    <hr>
    <ul>
        <li :class="index==0?a:'' " @click="pic(0)">1 </li>
        <li :class="index==1?a:'' " @click="pic(1)">2 </li>
        <li :class="index==2?a:'' " @click="pic(2)">3 </li>
        <li :class="index==3?a:'' " @click="pic(3)">4 </li>
        <li :class="index==4?a:'' " @click="pic(4)">5 </li>
        <li :class="index==5?a:'' " @click="pic(5)">6 </li>
    </ul>
    <img :src="srcArr[index]" alt="">





</div>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.min.js"></script>
<script>
    const vu = new Vue({
        el: "#app",
        data: {
            msg: 'hello vue',
            srcArr: [
                './imgs/11-00.gif',
                './imgs/11-01.gif',
                './imgs/11-02.gif',
                './imgs/11-03.gif',
                './imgs/11-04.png',
                './imgs/11-05.png'

            ],
            index: 0,
            // url: './imgs/11-00.gif'
            a: 'active'


        },
        methods: {
            pic(i) {
                // this.url = this.srcArr[i]
                this.index = i

            }

        },
    })
</script>






</body>

</html>